<?php

/**
 * DocenteDependente form base class.
 *
 * @package    form
 * @subpackage docente_dependente
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseDocenteDependenteForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_docente_dependente' => new sfWidgetFormInputHidden(),
      'id_docente'            => new sfWidgetFormDoctrineChoice(array('model' => 'Docente', 'add_empty' => false)),
      'nm_dependente'         => new sfWidgetFormInput(),
      'sg_grau'               => new sfWidgetFormChoice(array('choices' => array('C' => 'C', 'F' => 'F', 'P' => 'P', 'M' => 'M', 'O' => 'O'))),
      'dt_nascimento'         => new sfWidgetFormDate(),
      'created_at'            => new sfWidgetFormDateTime(),
      'updated_at'            => new sfWidgetFormDateTime(),
      'deleted'               => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id_docente_dependente' => new sfValidatorDoctrineChoice(array('model' => 'DocenteDependente', 'column' => 'id_docente_dependente', 'required' => false)),
      'id_docente'            => new sfValidatorDoctrineChoice(array('model' => 'Docente')),
      'nm_dependente'         => new sfValidatorString(array('max_length' => 100)),
      'sg_grau'               => new sfValidatorChoice(array('choices' => array('C' => 'C', 'F' => 'F', 'P' => 'P', 'M' => 'M', 'O' => 'O'))),
      'dt_nascimento'         => new sfValidatorDate(),
      'created_at'            => new sfValidatorDateTime(array('required' => false)),
      'updated_at'            => new sfValidatorDateTime(array('required' => false)),
      'deleted'               => new sfValidatorBoolean(),
    ));

    $this->widgetSchema->setNameFormat('docente_dependente[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DocenteDependente';
  }

}
